home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.msstate.edu!phoenix!vkire
- From: vkire@ERC.MsState.Edu (Kiril Nikola Vidimce)
- Newsgroups: comp.lang.c++
- Subject: new and multidimensional arrays
- Date: 19 Mar 1996 01:32:29 GMT
- Organization: Mississippi State University
- Message-ID: <4il2rd$4fs@NNTP.MsState.Edu>
- NNTP-Posting-Host: phoenix.erc.msstate.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- if i have a method declared as:
-
- setValues (int, int, float [][3])
-
- how can i declare a dynamic array with new?
-
- i tried:
-
- float *variable[3];
-
- for (i=0; i<size; i++)
- variable [i] = new float [3];
-
- but it doesnt work [the compiler says that there is no instance of
- the above method that accepts that kind of a parameter.
-
- hints?
-
- thanks,
- KV
- --
-
- +-------------------------------------------------------------+
- | Kiril N. Vidimce, Comp.Sci. - "I hear and I forget, |
- | PO Box 3167, MS State, MS 39762 - "I see and I remember, |
- | vkire@erc.msstate.edu - I do and I understand." |
- | vkire@gtlug.org - - Confucious |
- + Cubicle #303 @ ERC -----------------------------------------+
-